class CreateAdmin < ActiveRecord::Migration
  def self.up
    user = User.new
    user.name = "Administrator"
    user.firstName = "Mister"
    user.nickName = "admin"
    user.user_role = "admin"
    user.password = "admin"
    user.create_address(:street => "Rathenaustrasse", :streetNr => "50", :city => "Berlin", :zip => "12345")
    
    user.save
    
    test_cust = User.new
    test_cust.name = "Customer"
    test_cust.firstName = "King"
    test_cust.nickName = "test"
    test_cust.user_role = "cust"
    test_cust.password = "test"
    test_cust.create_address(:street => "Rathenaustrasse", :streetNr => "50", :city => "Berlin", :zip => "12345")
    
    test_cust.save
    
  end

  def self.down
    #user = User.find_by_nickName("admin")
    #user.delete
  end
end
